Skip to content

fix [NEX-28]: file_type is None for result_file_type in chunker partition json#4016

Closed
yuming-long wants to merge 8 commits intomainfrom
yuming/nex-28-chunker-error-nonetype-object-has-no-attribute
Closed

fix [NEX-28]: file_type is None for result_file_type in chunker partition json#4016
yuming-long wants to merge 8 commits intomainfrom
yuming/nex-28-chunker-error-nonetype-object-has-no-attribute

Conversation

@yuming-long
Copy link
Copy Markdown
Contributor

@yuming-long yuming-long commented Jun 11, 2025

Summary

'NoneType' object has no attribute 'partitioner_shortname' due to result_file_type = self._disambiguate_json_file_type could return None for file type

Bug Invest Notes

to fix the error 'NoneType' object has no attribute 'partitioner_shortname' in chucker i found the ES logs under same org:
Screenshot 2025-06-11 at 7 02 01 PM
stack trace from the utic-api ES log doc:
Screenshot 2025-06-11 at 7 09 38 PM
and note that the content-type got changed into "content_type": "application/x-ole-storage", in unstructured code (doc type for partitioner ?) even though we are making an API call with the correct content type "GeneralFormParams(coordinates=False, encoding=None, content_type='application/json'
Screenshot 2025-06-11 at 7 24 09 PM
so maybe
Screenshot 2025-06-12 at 11 23 34 AM
we are passing the msg file here not json?

@yuming-long
Copy link
Copy Markdown
Contributor Author

this is not the root cause of the bug - will close this one for now

@yuming-long
Copy link
Copy Markdown
Contributor Author

yuming-long commented Jun 13, 2025

reopen to add some None type protection Moved to another one

@yuming-long yuming-long reopened this Jun 13, 2025
PastelStorm and others added 6 commits June 12, 2025 19:57
In this pull request parent-child relationship for elements generated
with v2 parser is based on actual element IDs instead of IDs baked
somewhere in the HTML script.
With some extra bug fixing it allowed for significantly simplifying json
-> HTML script
### Summary
To fix error `Error in chunk: 512: {"detail":"'NoneType' object has no
attribute 'strip'"}` I found the logs under same org (could assume this
is the same job)

screenshot:
![Screenshot 2025-06-11 at 10 15
57 AM](https://github.com/user-attachments/assets/c50ada55-eef1-43f7-9e27-9b9ae339a6fb)

stack trace from the `utic-api` ES log doc:
![Screenshot 2025-06-11 at 2 01
01 PM](https://github.com/user-attachments/assets/7e84fa24-4eb6-45e8-b195-a11d3d124bfa)



### Notes
longer term we should make partitioner (vlm + utic-api) not return text
with Null

---------

Co-authored-by: ryannikolaidis <1208590+ryannikolaidis@users.noreply.github.com>
Co-authored-by: yuming-long <yuming-long@users.noreply.github.com>
new `torch==2.7.1` now comes with nvidia gpu support and triton as
dependencies. Those are not supported by `arm64` or actually being used
by `unstructured` in `adm64` either. This is a quick patch to remove
those from .txt requirements files to unblock builds.
@yuming-long yuming-long changed the title fix file_type is None for JSON (chunker) fix [NEX-28]: file_type is None for result_file_type in chunker partition json Jun 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants